﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Web.SystemConfig.Services;
using Web.SystemConfig.DataAccess;
using DreamBuilder.Common;

namespace Web.SystemConfig.Business
{
    public class BUSChangePassword : BusinessBase, IChangePassword
    {

        DALChangePassword dal;

        public BUSChangePassword()
        {
            dal = new DALChangePassword();
        }

        public bool CheckUserPassword(string userID, string oldpass)
        {
            DataTable dt = dal.CheckUserPassword(userID, oldpass);
            if (dt != null && dt.Rows.Count > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        public int UpdateUserPasswd(string userID, string pass)
        {
            return dal.UpdateUserPasswd(userID, pass);
        }
    }
}
